<?php

class Event_model extends CI_Model {
    
    function Event_model() {
        $this->load->library('api/services/Event');
    }
    
    function event_get($event_id) {
        $data = Event::eventGet($event_id);
        
        if(!empty($data)) return $data;
        else return false;
    }
    
    function event_set($language_id, $name, $cover, $content) {
        return Event::eventSet($language_id, $name, $cover, $content);
    }
    
    function event_update($event_id, $language_id, $name, $cover, $content) {
        return Event::eventUpdate($event_id, $language_id, $name, $cover, $content);
    }
    
    function event_delete($event_id) {
        return Event::eventDelete($event_id);
    }
    
    function events_list($language_id) {
        $data = Event::eventsList($language_id);
        
        if(!empty($data)) return $data;
        else return false;   
    }
    
    function event_subscribe($email) {
        return Event::eventSubscribe($email);
    }
    
    function event_unsubscribe($email) {
        return Event::uneventSubscribe($email);
    }
    
    function event_subscribers_list() {
        $data = Event::eventSubscribersList();
        
        if(!empty($data)) return $data;
        else return false;   
    }    
    
}

?>